package com.company.management.domain.rsp;

/**
 * @Author: Administrator
 * @Date: 2025/3/2 15:15
 * @Description: Performanceevaluations
 */

import com.company.management.constant.Constants;
import com.company.management.modal.entity.PerformanceEvaluations;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @author robet
 */
@ApiModel(value = "绩效考核对象", description = "绩效考核表")
@Data
public class PerformanceEvaluationsResp extends PerformanceEvaluations {
    private List<PerformanceUserResp> deptUserList;
    @ApiModelProperty("考核内容明碼")
    private String content;
    private String persons;
    private String personIds;

//    public String getContent(){
//        try {
//            if(this.getEvaluationContent()!=null){
//                String res =new String(super.getEvaluationContent(), Constants.GBK);
//                return res;
//            }
//            return "";
//        } catch (Exception e) {
//        }finally {
//            return "";
//        }
//    }

    @ApiModelProperty("考核人名稱")
    private String userName;

    @ApiModelProperty("創建人")
    private String createName;
    @ApiModelProperty("考核时间")
    //yyyy年MM月dd日 HH时mm分ss秒
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date resCreateTime;
    @JsonFormat(pattern = "yyyy年MM月dd日", timezone = "GMT+8")
    private Date createDate;

    @ApiModelProperty("是否结束 0 没有，1 结束")
    private Integer finish;
    private String pass;
    private Integer fisSuccess;
    public String getPass(){
        if (this.getFisSuccess()==null){
            return Constants.PERFORMANCE_ERROR;
        }
        if(this.getFisSuccess()==1){
            return Constants.PERFORMANCE_SUC;
        }else{
            return Constants.PERFORMANCE_ERROR;
        }
    }
    private String comments;
    private Integer resultId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
}
